package com.youlai.boot.system.model.bo;

import com.mybatisflex.annotation.RelationManyToMany;
import com.mybatisflex.annotation.RelationOneToMany;
import lombok.Data;

import java.util.Set;

/**
 * 角色权限业务对象
 *
 * @author haoxr
 * @since 2023/11/29
 */
@Data
public class RolePermsBO {

    private Long id;

    /**
     * 角色编码
     */
    private String roleCode;

    /**
     * 权限标识集合
     */
    @RelationManyToMany(
            selfField = "id",
            targetTable = "sys_menu",
            targetField = "id",
            joinTable = "sys_role_menu",
            joinSelfColumn = "role_id",
            joinTargetColumn = "menu_id",
            valueField = "perm"
    )
    private Set<String> perms;


}
